package Controller;

import java.io.FileInputStream;

import javazoom.jl.player.advanced.AdvancedPlayer;

public class SimpleAsynchronousPlayer {
		
	
		public void playFile (String fileName) {
		FileInputStream mySong;
		final AdvancedPlayer player;
		try {
		mySong = new FileInputStream(
		new File(fileName));
		player = new AdvancedPlayer(mySong);
		new Thread() {
		public void run() {
		try {
		player.play();
		} catch (JavaLayerException e) {
		e.printStackTrace();
		}
		}
		}.start();
		} catch (IOException e) {
		e.printStackTrace();
		}
		
}
